Exercise 1

Install and attach the Rvest package. You can find more information about the package here

Exercise 2

1

Go to the Wikipedia Entry of YouTube in your https://en.wikipedia.org/wiki/YouTube Browser and find the Xpath that corresponds to the whole table on the right side of the screen.
You can do this in Google Chrome by going to the website, right clicking on the page and clicking on inspect. Alternatively, you can just press Ctrl + Alt + I. By expanding the containers and hovering your mouse over them, you can see which elements on the website they correpsond to. To copy the Xpath of an element, right-click on the container and select copy -> Copy full Xpath. Be carefull to select the HTML that encompasses the entire table and not only parts of it

Exercise 3

Using the Xpath extract the information from the table

Tip

Use the read_html(), html_nodes() and html_table() functions. You can read more about them in the Help panel in R studio or by calling them preceded by two question marks, e.g. ??read_html().